﻿namespace HelperLibrary;

public class AVCKey
{
    [DllImport("AVCKey")]
    public static extern int AVCKey_GetLicense(byte[] pLicense);

    [DllImport("AVCKey")]
    public static extern IntPtr AVCKey_InitAuthCode(string pLicense);

    [DllImport("AVCKey")]
    public static extern void AVCKey_FiniAuthCode(IntPtr lHandle);

    [DllImport("AVCKey")]
    public static extern bool AVCKey_SetAuthCodeExpireDate(IntPtr lHandle, string pDate);

    [DllImport("AVCKey")]
    public static extern bool AVCKey_SetAuthCodeProductType(IntPtr lHandle, int iType);

    [DllImport("AVCKey")]
    public static extern bool AVCKey_SetAuthCodeParam(IntPtr lHandle, int iId, int iParam);

    [DllImport("AVCKey")]
    public static extern int AVCKey_GetAuthCode(IntPtr lHandle, byte[] pAuthCode);

    [DllImport("AVCKey")]
    public static extern int AVCKey_VerifyAuthCode(string pAuthCode);

    [DllImport("AVCKey")]
    public static extern bool AVCKey_GetAuthCodeExpireDate(string pAuthCode, byte[] pDate);

    [DllImport("AVCKey")]
    public static extern int AVCKey_GetAuthCodeProductType(string pAuthCode);
    [DllImport("AVCKey")]
    public static extern int AVCKey_GetAuthCodeParam(string pAuthCode, int iId);

}
